Skip to content

Fixes #56 : Top Level docker-compose#57

Merged
Kmadhav824 merged 4 commits intoshivamxverma:mainfrom
Kmadhav824:main
Apr 26, 2026
Merged

Fixes #56 : Top Level docker-compose#57
Kmadhav824 merged 4 commits intoshivamxverma:mainfrom
Kmadhav824:main

Conversation

@Kmadhav824
Copy link
Copy Markdown
Collaborator

I've added a top level docker-compose yaml for devs

Copilot AI review requested due to automatic review settings April 26, 2026 18:24
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 26, 2026

@Kmadhav824 is attempting to deploy a commit to the Shivam verma's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a top-level Docker Compose setup intended to support local development by providing shared infrastructure services, while also updating ignores, cleaning committed logs, and adjusting schema/dependency wiring in the monorepo.

Changes:

  • Add root docker-compose.yaml with Postgres + Redis services for local dev.
  • Remove committed log/audit artifacts and expand .gitignore rules across packages to prevent re-adding them.
  • Update lockfiles/dependencies and adjust backend schema import pathing.

Reviewed changes

Copilot reviewed 7 out of 23 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
docker-compose.yaml Introduces Postgres + Redis services for local development.
.gitignore Expands repo-wide ignores for deps, env files, logs, and build outputs.
backend/.gitignore Adds backend-local ignores for env/logs/scratch/build artifacts.
workers/.gitignore Adds workers-local ignores for deps/env/logs/build artifacts.
Frontend/.gitignore Expands env ignore patterns and adds coverage output ignore.
backend/src/loaders/postgres.ts Changes schema import to a deep relative path to db-schema/src.
workers/pnpm-lock.yaml Updates workers dependency graph (incl. BullMQ/Drizzle/PG/Winston entries).
db-schema/pnpm-lock.yaml Updates db-schema lockfile content (removes prior dev dependency entries).
workers/logs/error/error-2026-04-25.log Removes committed runtime log artifact.
workers/logs/error/error-2026-04-24.log Removes committed runtime log artifact.
workers/logs/error/error-2026-04-23.log Removes committed runtime log artifact.
workers/logs/error/error-2026-04-22.log Removes committed runtime log artifact.
workers/logs/combined/combined-2026-04-25.log Removes committed runtime log artifact.
workers/logs/combined/combined-2026-04-24.log Removes committed runtime log artifact.
workers/logs/combined/combined-2026-04-23.log Removes committed runtime log artifact.
workers/logs/combined/combined-2026-04-22.log Removes committed runtime log artifact.
workers/logs/combined/.a38ab147e6d6cf164f60c30ab92bc91339f28bcb-audit.json Removes committed log-rotation audit artifact.
backend/logs/error/error-2026-04-21.log Removes committed runtime log artifact.
backend/logs/error/error-2026-04-20.log Removes committed runtime log artifact.
backend/logs/error/error-2026-03-31.log Removes committed runtime log artifact.
backend/logs/combined/combined-2026-04-20.log Removes committed runtime log artifact.
backend/logs/combined/.0249dc91aa5f529d3b84500f8c29e94ef13aaf30-audit.json Removes committed log-rotation audit artifact.
Files not reviewed (2)
  • db-schema/pnpm-lock.yaml: Language not supported
  • workers/pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docker-compose.yaml
Comment on lines +24 to +37
command:
[
"redis-server",
"--requirepass",
"strong_password_123",
"--appendonly",
"yes"
]
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "-a", "strong_password_123", "ping"]
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The healthcheck embeds the Redis password via redis-cli -a .... If you move the password to an env var, update the healthcheck to reference it too (so the password isn’t duplicated in multiple places).

Suggested change
command:
[
"redis-server",
"--requirepass",
"strong_password_123",
"--appendonly",
"yes"
]
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "-a", "strong_password_123", "ping"]
environment:
REDIS_PASSWORD: strong_password_123
command: >
sh -c 'exec redis-server --requirepass "$REDIS_PASSWORD" --appendonly yes'
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD-SHELL", "redis-cli -a \"$$REDIS_PASSWORD\" ping"]

Copilot uses AI. Check for mistakes.
import { drizzle } from 'drizzle-orm/node-postgres';
import logger from './logger';
import { schema } from 'db-schema';
import { schema } from '../../../db-schema/src/index';
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Importing the schema via a deep relative path (../../../db-schema/src/index) tightly couples backend to the monorepo folder layout and bypasses the existing TS path mapping for db-schema (see backend/tsconfig.json paths). Prefer importing from db-schema and fixing the package to export/build the intended entrypoint (e.g., ensure ../db-schema/dist exists or adjust db-schema exports/paths).

Suggested change
import { schema } from '../../../db-schema/src/index';
import { schema } from 'db-schema';

Copilot uses AI. Check for mistakes.
Comment thread docker-compose.yaml
Comment on lines +1 to +3
services:
postgres:
image: postgres:17-alpine
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description says this only adds a top-level docker-compose for devs, but the diff also includes dependency/lockfile changes (e.g., workers/db-schema pnpm-lock updates) and a backend code change (schema import). If these are intentional, it would help to call them out in the PR description or split them into separate PRs so the docker-compose change can be reviewed/rolled back independently.

Copilot uses AI. Check for mistakes.
Comment thread docker-compose.yaml
Comment on lines +6 to +10
environment:
POSTGRES_DB: codesm_dev
POSTGRES_USER: codesm
POSTGRES_PASSWORD: codesm_dev_password
ports:
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The compose file hard-codes PostgreSQL credentials in-repo. Even for dev, this makes it easy to accidentally reuse weak/shared secrets and encourages committing credentials. Consider moving these values to an .env/env_file (with a checked-in .env.example) and referencing them via ${...} in the compose file.

Copilot uses AI. Check for mistakes.
Comment thread docker-compose.yaml
Comment on lines +24 to +31
command:
[
"redis-server",
"--requirepass",
"strong_password_123",
"--appendonly",
"yes"
]
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Redis password is hard-coded in the compose file (--requirepass ...). This is easy to leak and makes rotation awkward. Prefer sourcing it from an .env/env_file and using variable substitution so each dev can set their own value.

Copilot uses AI. Check for mistakes.
@Kmadhav824 Kmadhav824 changed the title Fixes #56 : Top Level docke-compose Fixes #56 : Top Level docker-compose Apr 26, 2026
@Kmadhav824 Kmadhav824 merged commit f4fcbbb into shivamxverma:main Apr 26, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants